import request from '@/utils/request';

/**
 * 删除oss中的头像
 */

export function deleteImgFile(file){
  return request({
    url: "/deleteImgFile",
    method: 'post',
    params: {
      file
    }
  })
}

/*
*上传文件
*/
export function uploadFile (file){
  return request({
    url: '/uploadImgFile',
    method: 'post',
    params: {
      file
    },
  })
}

/**
 * 批量删除aliOss文件
 */
export function deleteFiles(files){
  return request({
    url:'/deleteFiles',
    method:'post',
    params:{
      files
    }
  })
}

/**
 * 下载文件
 * @param {*} file 
 * @returns 
 */
export function fileDownload(file){
  return request({
    url:'/fileDownload',
    method: 'post',
    responseType: 'blob',
    params:{
      file
    },
  })
}

